package oldGui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JPanel;

import editManager.*;
import invoiceManager.*;

import java.awt.Dimension;
import java.io.IOException;
import java.sql.Connection;
import java.awt.Toolkit;

public class ARManagerWindow {

	private JFrame frmMariettaDrapery;
	private EditManagerMain editManager;
	private InvoiceManagerMain invoiceManager;
	private Connection con;
	private String dbName;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					ARManagerWindow window = new ARManagerWindow();
					window.frmMariettaDrapery.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 * @throws IOException 
	 */
	public ARManagerWindow() throws IOException {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 * @throws IOException 
	 */
	private void initialize() throws IOException {
		frmMariettaDrapery = new JFrame();
		frmMariettaDrapery.setTitle("Marietta Drapery & Window Coverings - AR Console");
		frmMariettaDrapery.setBounds(100, 100, 800, 600);
		frmMariettaDrapery.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmMariettaDrapery.getContentPane().setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
		
		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setPreferredSize(new Dimension(775, 550));
		frmMariettaDrapery.getContentPane().add(tabbedPane);
		
		try {
			editManager = new EditManagerMain();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		tabbedPane.addTab("Order Edits", null, editManager, null);
				
		invoiceManager = new InvoiceManagerMain();
		tabbedPane.addTab("Invoices", null, invoiceManager, null);
		
	}

}
